/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package fr.eisti.icc.zk;

import org.zkoss.zk.ui.Executions;
import org.zkoss.zk.ui.util.GenericForwardComposer;
import org.zkoss.zul.Button;
import org.zkoss.zul.Window;

/**
 *
 * @author rogers
 */
public class LoginWindowController extends GenericForwardComposer {
    
    
    private Button loginBtn;
    
    public void onClick$loginBtn() {
        if (loginBtn.getLabel().equals("Se connecter")) {
            Window window = (Window) Executions.createComponents(
                    "authentification.zul", null, null);
            window.doModal();         
        }else{
            Executions.sendRedirect("/");
        }
    }
}
